package com.exception.exception;

import org.springframework.http.HttpStatus;

public class MyException extends RuntimeException{
    private int code;
    private HttpStatus httpStatus = HttpStatus.INTERNAL_SERVER_ERROR;
    private String messsage;

    public MyException(HttpStatus httpStatus, int code, String message, Throwable cause) {
        super(message, cause);
        this.httpStatus = httpStatus;
        this.code = code;
        this.messsage = message;
    }

    public String getMesssage() {
        return this.messsage;
    }

    public int getCode() {
        return this.code;
    }

    public HttpStatus getHttpStatus() {
        return this.httpStatus;
    }

    public MyException() {
    }

    public MyException(String message) {
        super(message);
    }

    public MyException(String message, Throwable cause) {
        super(message, cause);
    }

    public MyException(Throwable cause) {
        super(cause);
    }
}
